home *** CD-ROM | disk | FTP | other *** search
/ Varios Español / Varios Español.iso / PCT10 / PCTW$_05.ZIP / NOTESAMP.SC_ / NOTESAMP.SC
Text File  |  1993-09-11  |  7KB  |  301 lines

  1. ;;;;;;;;;;
  2. ;;    Demo del Bloc de notas - NOTESAMP.SCT
  3. ;;    Versi≤n 1.0
  4. ;;
  5. ;;    Copyright 1993 Central Point Software, Inc.
  6. ;;
  7. ;;Prop≤sito:
  8. ;;        Demostrar el uso de la aplicaci≤n Bloc de notas de ScriptTools
  9. ;;
  10. ;;Comandos usados:
  11. ;;        FileExists(
  12. ;;        GetEnvironment$(
  13. ;;        MessageBox(
  14. ;;        TopInstance(
  15. ;;        Attach
  16. ;;        EditText
  17. ;;        Exec
  18. ;;        Exit
  19. ;;        If
  20. ;;        Keyboard
  21. ;;        MenuSelect
  22. ;;        Mouse
  23. ;;        MouseClick
  24. ;;        MouseMove
  25. ;;        Pause
  26. ;;        Type
  27. ;;    
  28. ;;;;;;;;;;
  29. ;;TΘrminos internacionales usados en el script.
  30. Notepad_Name$="NOTEPAD_Bloc de notas"
  31. Notepad_SaveAs$="NOTEPAD_Guardar como"
  32. Notepad_PageSetup$="NOTEPAD_Preparar pßgina"
  33. Notepad_PrintSetup$="NOTEPAD_Configuraci≤n de impresi≤n"
  34. Notepad_Open$="NOTEPAD_Abrir"
  35. Notepad_Find$="NOTEPAD_Buscar"
  36. Notepad_About$="NOTEPAD_Acerca de Bloc de notas"
  37. Ctrl$="{Ctrl}"
  38. Home$="{Inicio}"
  39. Up$="{Arriba}"
  40. Return$="{Intro}"
  41. ;;Fin de las series internacionales.
  42.  
  43. copy "c:\autoexec.bat" to "c:\temp.txt"
  44.  
  45. if FileExists("c:\temp.txt")=0 then
  46.     MessageBox("Error","El script no pudo copiar c:\autoexec.bat a c:\temp.txt, se sale ahora.",0)
  47.     Exit    ;Se sale del script para evitar la creaci≤n de cuadros de dißlogo indeseados
  48. endif
  49.  
  50. Exec "Notepad"            ;Ejecuta NOTEPAD.EXE
  51. NoteInst=TopInstance()    ;Obtiene un nuevo n·mero de instancia para notepad.exe en caso de que otra copia se estΘ ejecutando
  52. Mouse OFF                ;Desactiva temporalmente la funci≤n de entrada del usuario
  53. Keyboard OFF
  54.  
  55. Attach "NOTEPAD_Edit1",NoteInst
  56.     Type "Este script muestra c≤mo ScriptTools funciona con el Bloc de notas."+Return$
  57.     pause 2 seconds
  58.  
  59. Attach Notepad_Name$,NoteInst
  60. ;;
  61. ;;    Abre un archivo nuevo
  62. ;;
  63.     Wk_New = 9
  64.  
  65. ;     Elige "Wk_New" del men· Archivo
  66.     MenuSelect Wk_New
  67.     pause 2 sec
  68. Attach Notepad_Name$,NoteInst
  69.     Wk_No = 7
  70.     Button Wk_No SingleClick
  71.     pause 2 sec
  72. Attach "NOTEPAD_Edit1",NoteInst
  73.     Type "Este es un archivo nuevo."+Return$
  74.     pause 2 seconds
  75.  
  76. Attach Notepad_Name$,NoteInst
  77.     Wk_New = 9
  78.     MenuSelect Wk_New
  79.     pause 2 sec
  80. Attach Notepad_Name$,NoteInst
  81.     Wk_No = 7
  82.     Button Wk_No SingleClick
  83.     pause 2 sec
  84.  
  85. Attach Notepad_Name$, NoteTest
  86.     Wk_Exit = 28
  87.     MenuSelect Wk_Exit
  88.  
  89. Exec "Notepad c:\temp.txt";Ejecuta NOTEPAD.EXE y abre temp.txt
  90. NoteInst=TopInstance()    ;Obtiene un nuevo n·mero de instancia para notepad.exe en caso de que otra copia se estΘ ejecutando
  91.  
  92.  
  93. Attach "NOTEPAD_Edit1",NoteInst
  94.     Type Return$
  95.     Type Up$+"Este es un archivo antiguo."+Return$
  96.     Pause 2 Seconds
  97.     Type Return$
  98.  
  99. Attach Notepad_Name$,NoteInst
  100. ;;
  101. ;;    Usa la funci≤n Guardar como
  102. ;;
  103.     Wk_SaveAs = 2
  104.  
  105. ;     Elige "Wk_SaveAs" del men·
  106.     MenuSelect Wk_SaveAs
  107.  
  108. Attach Notepad_SaveAs$,NoteInst
  109.     Wk_1152 = 1152
  110.     Pause 2 Seconds
  111.     Wk_Cancel = 2
  112.     Button Wk_Cancel SingleClick
  113.  
  114. Attach "NOTEPAD_Edit1",NoteInst
  115.     Type "Acaba de ver la funci≤n Guardar com≤."+Return$
  116.     Pause 2 seconds
  117.     Type Return$
  118.  
  119. Attach Notepad_Name$,NoteInst
  120. ;;
  121. ;;    Abre el men· Preparar pßgina
  122. ;;
  123.     Wk_PageSetup = 32
  124.  
  125. ;     Elige "Wk_PageSetup" del men·
  126.     MenuSelect Wk_PageSetup
  127.  
  128. Attach Notepad_PageSetup$,NoteInst
  129.     Wk_f = 30
  130.     EditText Wk_f "&f"
  131.     pause 2 seconds
  132.     Wk_OK = 1
  133.     Button Wk_OK SingleClick
  134.  
  135. Attach "NOTEPAD_Edit1",NoteInst
  136.     Type "Acaba de ver la funci≤n Preparar pßgina."+Return$
  137.     Pause 2 seconds
  138.  
  139. Attach Notepad_Name$,NoteInst
  140. ;;
  141. ;;    Elige el men· Instalar impresora
  142. ;;
  143.     Wk_PrintSetup = 31
  144.  
  145. ;     Elige "Wk_PrintSetup" del men·
  146.     MenuSelect Wk_PrintSetup
  147.  
  148. Attach Notepad_PrintSetup$,NoteInst
  149. pause 2
  150.  
  151.     Wk_Cancel = 2
  152.     Button Wk_Cancel SingleClick
  153.  
  154. Attach "NOTEPAD_Edit1",NoteInst
  155.     Type Return$
  156.     Type "Acaba de ver la funci≤n Instalar impresora."+Return$
  157.     Pause 5 seconds
  158.  
  159. Attach Notepad_Name$,NoteInst
  160.     Wk_Exit = 28
  161.  
  162. ;     Elige "Wk_Exit" del men·
  163.     MenuSelect Wk_Exit
  164.  
  165. Attach Notepad_Name$,NoteInst
  166.     Wk_No = 7
  167.     Button Wk_No SingleClick
  168.  
  169.     exec "notepad"
  170.     NoteInst=TopInstance();Obtiene un nuevo n·mero de instancia para notepad.exe
  171.  
  172.     Attach Notepad_Name$, NoteInst
  173.     Wk_Open = 10
  174.  
  175. ;     Elige "Wk_Open" del men·
  176.     MenuSelect Wk_Open
  177.  
  178. Attach Notepad_Open$, NoteInst
  179.     EditText 1152 "c:\temp.txt"
  180.     Wk_OK = 1
  181.     Button Wk_OK SingleClick
  182.  
  183. ;;
  184. ;;    Ejemplo de Cortar y Pegar
  185. ;;
  186.  
  187. Attach "NOTEPAD_Edit1", NoteInst
  188.     MouseClick Left Button Down At 0, 8
  189.     MouseMove 23 69
  190.     MouseMove 55 109
  191.     MouseMove 103 133
  192.     MouseMove 159 138
  193.     MouseMove 235 147
  194.     MouseMove 301 152
  195.     MouseMove 371 154
  196.     MouseMove 375 153
  197.     MouseMove 391 152
  198.     MouseMove 405 144
  199.     MouseMove 423 134
  200.     MouseMove 426 132
  201.     MouseMove 427 131
  202.     MouseMove 427 130
  203.     MouseMove 427 129
  204.     MouseMove 428 129
  205.     MouseMove 427 129
  206.     MouseMove 427 130
  207.     MouseClick Left Button Up At 427, 130
  208.  
  209. Attach Notepad_Name$, NoteInst
  210.     Wk_CopyCtrlC = 769
  211.     MenuSelect Wk_CopyCtrlC
  212.  
  213. Attach "NOTEPAD_Edit1", NoteInst
  214.     Type Return$
  215.     Type Return$
  216.  
  217. Attach Notepad_Name$, NoteInst
  218.     Wk_PasteCtrlV = 770
  219.  
  220. ;     Elige "Wk_PasteCtrlV" del men·
  221.     MenuSelect Wk_PasteCtrlV
  222.  
  223. Attach "NOTEPAD_Edit1", NoteInst
  224.     Type Up$+Up$+Up$+Up$+Up$+Up$+Up$+Up$+Up$+Up$+Up$+Return$
  225.     Type "Acaba de ver las funciones Copiar y Pegar."+Return$
  226.     pause 2 seconds
  227.  
  228. Attach Notepad_Name$, NoteInst
  229. ;;
  230. ;;    Funci≤n Buscar
  231. ;;
  232.     Wk_Find = 3
  233.  
  234. ;     Elige "Wk_Find" del men·
  235.     MenuSelect Wk_Find
  236. Pause 2
  237. Attach Notepad_Find$, NoteInst
  238.     Wk_document = 1152
  239.     EditText Wk_document "c:\"
  240. Pause 1
  241.     Wk_FindNext = 1
  242.     Button Wk_FindNext SingleClick
  243. Pause 1
  244.     Wk_Cancel = 2
  245.     Button Wk_Cancel SingleClick
  246.  
  247. Attach "NOTEPAD_Edit1", NoteInst
  248.  
  249. Attach Notepad_Name$, NoteInst
  250.     Wk_FindNextF3 = 8
  251.  
  252. ;     Elige "Wk_FindNextF3" del men·
  253.     MenuSelect Wk_FindNextF3
  254.  
  255. Attach "NOTEPAD_Edit1", NoteInst
  256.     Type "{F3}{F3}{F3}{F3}{F3}{F3}{F3}{F3}{F3}{F3}{F3}{F3}{F3}{F3}{F3}{F3}{F3}{F3}"
  257.  
  258. Attach Notepad_Name$, NoteInst
  259.     Wk_OK = 2
  260.     Button Wk_OK SingleClick
  261.  
  262. Attach "NOTEPAD_Edit1", NoteInst 
  263. type Ctrl$+Home$+"Acaba de ver la funci≤n Buscar."+Return$
  264. Pause 2
  265.  
  266. Attach Notepad_Name$, NoteInst
  267. ;;
  268. ;;    Abre el men· Acerca de
  269. ;;
  270.  
  271.     Wk_AboutNotepad = 11
  272.  
  273. ;     Elige "Wk_AboutNotepad" del men·
  274.     MenuSelect Wk_AboutNotepad
  275.     Pause 2 seconds
  276.  
  277. Attach Notepad_About$, NoteInst
  278.     Wk_OK = 1
  279.     Button Wk_OK SingleClick
  280.  
  281. Attach "NOTEPAD_Edit1", NoteInst
  282. Type "Acaba de ver el cuadro de dißlogo titulado Acerca de Bloc de notas."+Return$+Return$
  283. Pause 2
  284. Type "Ojalß haya disfrutado la demostraci≤n. "+Return$+Return$+"Hasta pronto."
  285. ;;
  286. ;;    Sale del Bloc de notas, luego termina el script
  287. ;;
  288. Attach Notepad_Name$, NoteTest
  289.     Wk_Exit = 28
  290.  
  291. ;     Select "Wk_Exit" from the Menu
  292.     MenuSelect Wk_Exit
  293.  
  294. Attach Notepad_Name$, NoteTest
  295.     Wk_No = 7
  296.     Button Wk_No SingleClick
  297.  
  298. Mouse ON
  299. Keyboard ON
  300. delete "c:\temp.txt"
  301.